import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/admin',
    },
    {
      path: '/admin',
      name: 'AdminDashboard',
      component: () => import('../view/AdminDashboard.vue'),
    },
    {
      path: '/admin/announcements',
      name: 'AnnouncementEditor',
      component: () => import('../view/AnnouncementEditor.vue'),
    },
    {
      path: '/admin/staff',
      name: 'StaffEditor',
      component: () => import('../view/StaffEditor.vue'),
    },
    {
      path: '/admin/gallery',
      name: 'GalleryEditor',
      component: () => import('../view/GalleryEditor.vue'),
    },
    {
      path: '/admin/donors',
      name: 'DonorEditor',
      component: () => import('../view/DonorEditor.vue'),
    },
    {
      path: '/admin/password',
      name: 'PasswordEditor',
      component: () => import('../view/PasswordEditor.vue'),
    },
  ],
})

export default router
